home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Graphics⁄Sound / RTrace-1.0-src / macerrors.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-18  |  2.3 KB  |  45 lines  |  [TEXT/KAHL]

  1. /* Defines */
  2. #define DEBUG_PRINT 0
  3.  
  4. /* Prototypes */
  5. char *get_mac_error_message(short error_code);
  6. void abortive_error(short error_code);
  7. void abortive_string_error(char *error_string);
  8. void terminal_error(short error_code);
  9. void terminal_string_error(char *error_string);
  10. void terminal_startup_error(short error_code);
  11. void possibly_terminal_string_error(char *error_string);
  12.  
  13. extern int  log_window_available;
  14.  
  15. /*****************************************************************************\
  16. * macro DB                                                                    *
  17. *                                                                             *
  18. * Purpose: This macro is used for debug if the Think_C debugger can't be      *
  19. *          used. If the debug_print flag is ON, then this message will print, *
  20. *          otherwise, it only costs a simple “if” test (very cheap).          *
  21. * Notes: If this procedure is called after the log window has been inited,the *
  22. *       message will appear in the log window, otherwise, it will appear in   *
  23. *       a console window.  The string should have a one character pad at the  *
  24. *       end to convert to a '\r' if the message will appear in the log window.*
  25. *                                                                             *
  26. * Parameters: msg: line to output                                             *
  27. *                                                                             *
  28. * Created by: Reid Judd                                                       *
  29. * Created on: Oct 18, 1992                                                    *
  30. * Modified:                                                                   *
  31. \*****************************************************************************/
  32.  
  33. #define DB( msg )                                 \
  34. {                                                 \
  35.   if (DEBUG_PRINT)                                \
  36.   {                                               \
  37.      if (log_window_available)                    \
  38.      {                                            \
  39.          msg[strlen(msg) - 1] = '\r';              \
  40.         add_line_to_log_window(msg);              \
  41.      } else {                                     \
  42.          printf("debug:%s\n", msg );              \
  43.      }                                            \
  44.   }                                               \
  45. }